These will replace the previous gtk_snapshot_new_with_parent(), which
allocated an entirely new GObject just to push()/pop() some state. This
is already a problem but will be more important in the future as we
start using this more.
return gtk_snapshot_pop_one (snapshot);
}
+/**
+ * gtk_snapshot_push_collect:
+ *
+ * PRIVATE.
+ *
+ * Puhses state so a later pop_collect call can collect all nodes
+ * appended until that point.
+ */
+void
+gtk_snapshot_push_collect (GtkSnapshot *snapshot)
+{
+ gtk_snapshot_push_state (snapshot,
+ NULL,
+ gtk_snapshot_collect_default);
+}
+
+GskRenderNode *
+gtk_snapshot_pop_collect (GtkSnapshot *snapshot)
+{
+ GskRenderNode *result = gtk_snapshot_pop_internal (snapshot);
+
+ return result;
+}
+
/**
* gtk_snapshot_to_node:
* @snapshot: a #GtkSnapshot
const GdkRGBA *color,
float x,
float y);
+
+void gtk_snapshot_push_collect (GtkSnapshot *snapshot);
+GskRenderNode * gtk_snapshot_pop_collect (GtkSnapshot *snapshot);
+
G_END_DECLS
#endif /* __GTK_SNAPSHOT_PRIVATE_H__ */